#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;

class A{};
class B{};
class C : public A, public B
{
	//...
};
class Person
{
public:
	string name;
	int age;

	void operator=(const Person& person)
	{
		name = person.name;
		age = person.age;
	}
	Person(string name, int age)
		:name(name)
		, age(age)
	{}
	Person(const Person& person)
		:name(person.name)
		, age(person.age)
	{}

};

class Student : virtual public Person
{
public:
	string schoolflg;
	void whoami()
	{
		cout << name << ' ' << age << ' ' << schoolflg << endl;
		cout << name << ' ' << Person::age << ' ' << schoolflg << endl;
	}
	Student(string name, int age, string schoolflg)
		:Person(name,age)
		,schoolflg(schoolflg)
	{}
	Student(const Student& student)
		:Person(student)
		,schoolflg(student.schoolflg)
	{}
	void operator=(const Student& student)
	{
		Person::operator=(student);
		schoolflg = student.schoolflg;
	}
};
class H : virtual Person
{
public:
	H(string name,int age)
		:Person(name, age)
	{}

};
template <class T>
class mystack : public std::vector<T>
{
public:
	void push(const T& data)
	{
		vector<T>::push_back(data);
	}
	void pop()
	{
		vector<T>::pop_back();
	} 
	const T& top()
	{
		return vector<T>::back();
	} 
	bool empty()
	{
		return vector<T>::empty();
	}
};

class X : public H, public Student
{
public:
	X(string name ,int age, string flg)
		:Student(name,age,flg)
		,H(name,age)
	    ,Person(name,age)
	{}
};
int main()
{
	Student student("zzy", 12, "111");
	H h("xxx", 30);
	X x("000", 0, "000");
	student = x;
	
	return 0;
}